﻿#region << 版 本 注 释 >>
/*----------------------------------------------------------------
// Copyright (C) 2022 kingerrobot
// 版权所有。 
//
// 文件名：IRcsEquipCuring
// 文件功能描述：
//
// 创建者：名字 (zzl)
// 时间：2022/1/19 13:52:14
//
// 修改人：
// 时间：
// 修改说明：
// 版本：V1.0.0
//----------------------------------------------------------------*/
#endregion
namespace KingerRobot.MexicoSailunWMS.SpiService;
internal interface IRcsEquipCuring
{
    /// <summary>
    /// 获得硫化机信息
    /// </summary>
    /// <param name="id"></param>
    /// <returns></returns>
    PORcsEquipCuring GetCuringById(long id);

    CuringLRDTO GetCuringRLByCuringLocId(long curingLocId);
    /// <summary>
    /// 获取所有启用的硫化机信息
    /// </summary>
    /// <returns></returns>
    List<PORcsEquipCuring> GetEquipCurings();

    /// <summary>
    /// 获取所有硫化机信息
    /// </summary>
    /// <returns></returns>
    List<PORcsEquipCuring> GetAllEquipCurings();
    /// <summary>
    /// 通过编号获取硫化位
    /// </summary>
    /// <param name="curingCode"></param>
    /// <returns></returns>
    List<PORcsEquipCuring> GetEquipCuringsByCode(string curingCode);

    /// <summary>
    /// 通过硫化Id 获取硫化信息
    /// </summary>
    /// <param name="curingId">硫化机</param>
    /// <returns></returns>
    PORcsEquipCuring GetCuringByCuringId(long curingId);
    /// <summary>
    /// 获取硫化机左右模
    /// </summary>
    /// <param name="curing"></param>
    /// <returns></returns>
    CuringLRDTO GetCuringRLReault(PORcsEquipCuring curing);
    /// <summary>
    /// 获取硫化机左右模
    /// </summary>
    /// <param name="curingId">硫化机</param>
    /// <returns></returns>
    CuringLRDTO GetCuringRL(long curingId);
    /// <summary>
    /// 是否配对
    /// </summary>
    /// <param name="targetLoc">硫化机</param>
    /// <param name="otherTargetLoc">其他硫化机</param>
    /// <returns></returns>
    bool IsPairCuring(long targetLoc, long otherTargetLoc);

    /// <summary>
    /// 获取硫化机另一半
    /// </summary>
    /// <param name="curingId"></param>
    /// <returns></returns>
    long? GetOtherHalfCuring(long targetLoc);
    /// <summary>
    /// 暂停
    /// </summary>
    /// <param name="id"></param>
    /// <returns></returns>
    int UpdateCruingSuspend(long id);
    /// <summary>
    /// 停止
    /// </summary>
    /// <param name="id"></param>
    /// <returns></returns>
    int UpdateCuringStop(long id);

    /// <summary>
    /// 获取硫化机信息
    /// </summary>
    /// <returns></returns>
    List<CuringEquipAndLocBean> GetAllEquipCuringLoc();

    /// <summary>
    /// 查询硫化排内所有的硫化机
    /// </summary>
    /// <param name="ditchId"></param>
    /// <returns></returns>
    List<string> GetCuringCodesByDitchId(long ditchId);

    List<PORcsEquipCuring> GetCuringByCode(string curingCode);
    /// <summary>
    /// 所取所有硫化机编号
    /// </summary>
    /// <returns></returns>
    List<string> GetCuringCodes();
}

/// <summary>
/// 硫化机左右模
/// </summary>
internal class CuringLRDTO
{
    /// <summary>
    /// 硫化机ID
    /// </summary>
    public long CuringId { get; set; }
    /// <summary>
    /// 硫化机编号
    /// </summary>
    public string CuringCode { get; set; }
    /// <summary>
    /// 左右模
    /// </summary>
    public string Mode { get; set; }
    /// <summary>
    /// 编号
    /// </summary>
    public int ModeIndex { get; set; }
}

internal class CuringEquipAndLocBean
{
    public PORcsEquipCuring PORcsEquipCuring { get; set; }
    public POWcsEquipLoc POWcsEquipLoc { get; set; }
}
